3D Graphics Programming with QuickDraw 3D 1.5.4
Previous | QD3D Book | Overview | Chapter Contents | Next |
QuickDraw 3D defines bitmaps and pixmaps to specify the images used to define markers, textures, and other objects. A bitmap is a two-dimensional array of values, each of which represents the state of one pixel. A bitmap is defined by the TQ3Bitmap data type.
typedef struct TQ3Bitmap {
unsigned char *image;
unsigned long width;
unsigned long height;
unsigned long rowBytes;
TQ3Endian bitOrder;
} TQ3Bitmap;
A pixel map (or, more briefly, a pixmap ) is a two-dimensional array of values, each of which represents the color of one pixel. A pixmap is defined by the TQ3Pixmap data type.
typedef struct TQ3Pixmap {
void *image;
unsigned long width;
unsigned long height;
unsigned long rowBytes;
unsigned long pixelSize;
TQ3PixelType pixelType;
TQ3Endian bitOrder;
TQ3Endian byteOrder;
} TQ3Pixmap;
#define Pixmap_GetRowBytes(width, pixelSize) \
((pixelSize) < 8) \
? (((width) / (8 / (pixelSize))) + \
((width) % (8 / (pixelSize)) > 0)) \
: (width * ((pixelSize) / 8))
A storage pixel map (or, more briefly, a storage pixmap ) is a pixmap whose data is contained in a storage object. A storage pixmap is defined by the TQ3StoragePixmap data type.
typedef struct TQ3StoragePixmap {
TQ3StorageObject image;
unsigned long width;
unsigned long height;
unsigned long rowBytes;
unsigned long pixelSize;
TQ3PixelType pixelType;
TQ3Endian bitOrder;
TQ3Endian byteOrder;
} TQ3StoragePixmap;
#define Pixmap_GetRowBytes(width, pixelSize) \
((pixelSize) < 8) \
? (((width) / (8 / (pixelSize))) + \
((width) % (8 / (pixelSize)) > 0)) \
: (width * ((pixelSize) / 8))
Previous | QD3D Book | Overview | Chapter Contents | Next |